#include <stdio.h>
#include <string.h>

int main(int argc, char *argv[])
{
	char s1[512], s2[512], *p1, *p2;
	int len1, len2, ans, flg1, flg2;

	scanf("%s", s1);
	scanf("%s", s2);
	len1 = strlen(s1);
	len2 = strlen(s2);
    p1 = s1;
    p2 = s2;
    flg1 = 1;
    flg2 = 1;

    if (s1[0] == '-') {
        flg1 = -1;
        len1--;
        p1 = s1 + 1;
    }
    if (s2[0] == '-') {
        flg2 = -1;
        len2--;
        p2 = s2 + 1;
    }

    if (flg1 > flg2) printf("1");
    else if (flg1 < flg2) printf("-1");
    else {

        if (strcmp(p1, p2) > 0) ans = 1;
        else if (strcmp(p1, p2) < 0) ans = -1;
        else ans = 0;

        if (flg1 = -1) ans *= -1;

        printf("%d", ans);
    }

	printf("\n");

	return 0;
}
